layui.use(['form', "fsConfig", "fsCommon", "table"], function () {
    var form = layui.form,
        table = layui.table,
        layer = layui.layer,
        fsCommon = layui.fsCommon,
        fsConfig = layui.fsConfig,
        serverUrl = $.result(fsConfig, "global.serverUrl"),
        jumpLogin = $.result(fsConfig, "filters.401");

    var token = localStorage.getItem('cdce_serivce_token');
    if (token === "") {
        jumpLogin()
    }


    function callbackfun(data) {
        if(data.data.length == 0){
            return
        }
        table.render({
            elem: '#test'
            , cols: [[
                {field: 'batch_name', title: '考试批次'}
                , {field: 'course_name', title: '考试科目'}
                , {field: 'result',  templet: '#isPass', title: '是否合格'}
                , {field: 'result',  title: '得分'}
            ]]
            , data: data.data
        });
    }

    fsCommon.get("/exam/v1alpha/list", "", callbackfun);
});